package com.xsky.common.util;

public class PageInfo {

	private int pageNumber;

	private int numberPerPage;

	private String orderby;

	private String orderType;

	public String getOrderby() {
		return orderby;
	}

	public void setOrderby(String orderby) {
		this.orderby = orderby;
	}

	public String getOrderType() {
		return orderType;
	}

	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}

	public int getNumberPerPage() {
		return numberPerPage;
	}

	public void setNumberPerPage(int numberPerPage) {
		this.numberPerPage = numberPerPage;
	}

	public int getPageNumber() {
		return pageNumber;
	}

	public void setPageNumber(int pageNumber) {
		this.pageNumber = pageNumber;
	}

	/**从第几条数据开始
	 * @return
	 */
	public int getStart() {
		if (pageNumber < 1) {
			pageNumber = 1;
		}

		return (pageNumber - 1) * numberPerPage + 1;

	}

}
